Skip to main content

All Questions

0votes
0answers
39views

How to do I solve the following Assets Precompile error? [duplicate]

I am creating a ruby on rails project but my javascript files are not loading prperly.Running rails assets:clobber and then rails assets:precopile gives following error. $ postcss ./app/assets/builds/...
ANN17298's user avatar
0votes
0answers
66views

Rails autoloader is making private constants public

I'm trying to enforce a boundary in a Rails app: only code within the namespace Boundary should be able to access the class Boundary::Blackbox. This works alright when it's defined outside of an ...
Jellicle's user avatar
0votes
0answers
70views

Devise gem bundled but server indicating error

I am a newbie and would need some assistance. I added devise gem to my Instagram clone app and added "sign up", sign in", "sign out", and "edit profile" links onto ...
Dessy's user avatar
0votes
0answers
58views

JSON serialization with a group by query ... how to?

I have an API endpoint to pull a big JSON blob from one of my models, and it works, but I'd like to improve it. The current implementation is below, and mostly just works using built in associations. ...
valenumr's user avatar
0votes
1answer
75views

Error when sending invitation with Devise_invitable

I know there's some threads about this but, from what I saw they are quite old and can probably be outdated. I'm using devise and devise_invitable. The idea behind it is to allow admins and teachers ...
jccsag's user avatar
0votes
1answer
92views

Getting Error - ActionController::UnknownFormat in MembersController#edit_description

Input Image I'm encountering a "406 Not Acceptable" error in my Stimulus controller's fetch request. The controller is responsible for making an AJAX call to an endpoint, but it seems the ...
Yadnyesh-Dashpute's user avatar
0votes
0answers
114views

How to fix error in model with gem lockbox

I am using ruby '2.5.9' and rails '4.2.11.3'. I configured all needed things for this gem. I have db with column "password_ciphertext", In model: "has_encrypted :password". When I ...
Rom4ik617's user avatar
0votes
1answer
138views

POST data then navigate to a new page and persist said data in Rails, without using the database?

I'm aware POST requests aren't meant for navigation but I just want to check if what I've been tasked with is possible. I have a page in my Rails app - let's call it cars#index. I'm required to make ...
s89_'s user avatar
  • 1,743
1vote
2answers
122views

is there a way to write this clean?

So i have a flag to disable and enable a feature. and will based on the variable it has to toggle the flags flag_a, flag_b, are my two feature flags and the variable input string can be none, all,...
tech spam's user avatar
1vote
2answers
1kviews

Ruby Version Manager

I'm new to Ruby and currently using Windows 10. I'm facing difficulty installing RVM. Since I work on different projects with varying Ruby versions, I want to use RVM to manage them easily. Currently, ...
Sapareshan's user avatar
0votes
0answers
36views

"Bundle update rails" is failing with multiple dependencies error

I'm using following configuration inside the project directory: Ruby version ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [i386-mingw32] Rails version 4.2.5 Gem version 3.3.26 Bundler version 1.16....
Brown Rice's user avatar
0votes
1answer
45views

How to handle the params for accepts_nested_attributes_for for has_many association containing a lot of fields on both associated table

I have user model which has has_many association with building model. Initially I was creating the user and the building seperately by using user.create and user.buildings.create because there were ...
nitish's user avatar
0votes
2answers
79views

How can I prevent n+1 issue from array that is generating additional conditions?

I'm facing n+1 issue when using conditions on array that comes from includes query. Here are the following tables: rems |id| |name| 1 aaa 2 bbb rem_correlatives |id| |rem_id| |name| |deleted| |...
Carlos Morales's user avatar
0votes
1answer
135views

Rails both way relationship between two tables

In Ruby on Rails I'm trying to be able to create both way many-to-many relationship between two tables. I want a relationship in routes and controllers. For example I want to be able to do both of the ...
Abenezer Daniel's user avatar
0votes
0answers
49views

Getting permission denied error when downloading a html page as html

This is my shortlisted action and shortlisted.html.erb , when clicked on download the list of shortlisted candidates should get downloaded. def shortlisted ids= AppliedJob.shortlisted.pluck(:user_id) ...
Sid's user avatar

153050per page
close